<% extends "common/msui.html" %>
<% block title %>品牌<% endblock %>
<% block body %>
<% set brands = _pool.get('product.brand').search_read([], ['name']) %>
<div class="page" id='brands' ms-controller='brands'>
  <header class="bar bar-nav">
    <h1 class="title">品牌馆</h1>
    <a class="button button-link button-nav pull-left back" href="/mshop/index" >
      <span class="icon icon-left"></span>
      返回
    </a>
  </header>

  <div class='content '>
    <div class='brand-content'>
      <ul>
        <li ms-repeat='brands' class='brand-item'>
          <a ms-attr-href='/mshop/products?brand_id={{el.id}}'>
            <img ms-attr-src='/website/image/product.brand/{{el.id}}/logo' ms-attr-alt='{{el.name}}' />
            <span>{{el.name}}</span>
          </a>
        </li>
      </ul>
    </div>

  </div>


  <script type="application/javascript">
  $(function() {
    var brands = ${brands | tojson | safe}

    var category_vm = avalon.define({
        $id: 'brands',
        brands: brands,
    });

    avalon.scan();
  });
  </script>
<% endblock %>
</div>